package ddemo.dao;

import ddemo.pojo.Charger;

import java.util.List;

public interface ChargerMapper {
    @Select("SELECT * FROM `charger`")
    public List<Charger> searchCharger();

    @Select("INSERT INTO `charger` (chargerNumber,position) VALUES (#{chargerNumber}, #{position})")
    public int addCharger(@Param("chargerNumber") Integer username, @Param("position") String position );

    @Select("UPDATE  `charger` SET `chargerNumber` = #{chargerNumber},`position` = #{position} WHERE id = #{id}")
    public int updateCharger(@Param("chargerNumber") Integer chargerNumber,@Param("position")String position,@Param("id")Integer id);

    @Select("SELECT * from `charger`")
    public List<Charger> getcharger();
}
